<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2" />
    <g:set var="entityName" value="${message(code: 'asset.label', default: 'Company')}" />
    <title>查看资产信息</title>
</head>
 
<body>
    <div class="main-body">
        <div class="page-wrapper">
            <div class="page-header">
                <div class="page-header-title">
                    <h4>查看资产信息</h4>
                </div>

                <div class="page-header-breadcrumb">
                    <ul class="breadcrumb-title">
                        <li class="breadcrumb-item">
                            <a href="/salesDashboard/index">
                                <i class="icofont icofont-home"></i>
                            </a>
                        </li>
                        <li class="breadcrumb-item">
                            <g:link controller="asset" action="index">资产信息</g:link>
                        </li>
                        <li class="breadcrumb-item">查看资产信息</li>
                    </ul>
                </div>
            </div>

            <div class="page-body">
                <g:if test="${flash.message}">
                    <div class="message alert alert-info" role="status">${flash.message}
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">×</span></button>
                    </div>
                </g:if>
                <div class="card">
                    <div class="card-header">
                        <h5>资产信息</h5>

                        <div class="card-header-right">
                            <g:link action="edit" resource="${this.asset}" data-toggle="tooltip" data-placement="top" title="" data-original-title="编辑">
                                <i class="icofont icofont-edit"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>

                    <div class="card-block">
                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">资产名称</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.name}</p>
                            </div>
                            <label class="col-md-2 col-form-label">序列号</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.code}</p>
                            </div>

                        </div>
                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">资产状态</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.status?.name}</p>
                            </div>
                            <label class="col-md-2 col-form-label">产品</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.product?.name}</p>
                            </div>
                        </div>
                        <div class="form-group row">

                            <label class="col-md-2 col-form-label">客户</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.account?.name}</p>
                            </div>

                            <label class="col-md-2 col-form-label">联系人</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.contact?.fullName}</p>
                            </div>
                        </div>
                        <div class="form-group row">

                            <label class="col-md-2 col-form-label">数量</label>

                            <div class="col-md-3">
                                <p class="form-control-static">${this.asset?.quantity}</p>
                            </div>

                            <label class="col-md-2 col-form-label">采购时间</label>

                            <div class="col-md-3">
                                <g:formatDate date="${this.asset?.purchaseDate}" format="yyyy-MM-dd">${this.asset?.purchaseDate}</g:formatDate>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">安装时间</label>

                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:formatDate date="${this.asset?.installDate}" format="yyyy-MM-dd">${this.asset?.installDate}</g:formatDate>
                                </p>
                            </div>
                            <label class="col-md-2 col-form-label">停用时间</label>

                            <div class="col-md-3">
                                <p class="form-control-static">
                                    <g:formatDate date="${this.asset?.usageEndDate}" format="yyyy-MM-dd">${this.asset?.usageEndDate}</g:formatDate>
                                </p>
                            </div>

                        </div>

                        <div class="form-group row">
                            <label class="col-md-2 col-form-label">竞争对手设备</label>

                            <div class="col-md-3">
                                <p class="form-control-static">
                                    ${this.asset?.competitorAsset}
                                </p>
                            </div>
                        </div>

                        <div class="form-group row">

                            <label class="col-md-2 col-form-label">备注</label>

                            <div class="col-md-8">
                                <p class="form-control-static">
                                    ${this.asset?.description}
                                </p>
                            </div>
                        </div>

                    </div>
                </div>

                <div class="card">
                    <div class="card-header">
                        <h5>定制字段</h5>

                        <div class="card-header-right">
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/flexFieldInstanceTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>附件</h5>

                        <div class="card-header-right">
                            <g:link controller="attachment" action="create" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/attachmentTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>拜访</h5>

                        <div class="card-header-right">
                            <g:link controller="activity" action="createAppointment" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/appointmentTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>任务</h5>

                        <div class="card-header-right">
                            <g:link controller="activity" action="createTask" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/taskTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>客户反馈</h5>

                        <div class="card-header-right">
                            <g:link controller="issue" action="create" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/issueTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>笔记</h5>

                        <div class="card-header-right">
                            <g:link controller="note" action="create" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/noteTemplate" />
                </div>
                <div class="card">
                    <div class="card-header">
                        <h5>团队</h5>

                        <div class="card-header-right">
                            <g:link controller="assetTeam" action="create" params="[asset: this.asset?.id]" data-toggle="tooltip" data-placement="top" title="" data-original-title="新增">
                                <i class="icofont icofont-plus"></i>
                            </g:link>
                            <i class="icofont icofont-rounded-down"></i>
                        </div>
                    </div>
                    <g:render template="/layouts/mashTemplate/teamTemplate" />
                </div>

            </div>
        </div>
</body>

</html>
